This description relates to parser generation.
Some systems user parsers for analyzing an input and determining relationships among different portions of that input in order to interpret the input. Some parsers are written manually by a programmer. Some parsers are generated automatically by a parser generator. For example, some parser generators (also called compiler-compilers, such as yacc or Bison) accept as input a grammar with production rules (or simply “productions”), which describe syntactic elements, and relationships among them, that are considered to be valid according to that grammar. The parser generator provides as output information for parsing an input that conforms to the grammar that was provided to the parser generator. Various kinds of parsers may be used for processing a variety of different kinds of data. For example, an application-protocol parser translates packet streams into high-level representations of the traffic in those packet streams.